package com.server.common.logistics.yw56.track;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

@NoArgsConstructor
@Data
@Getter
@Setter
public class YW56GetTrackResponse {
    @SerializedName("code")
    private Integer code;
    @SerializedName("message")
    private String message;
    @SerializedName("result")
    private List<Result> result;
    @SerializedName("elapsedMilliseconds")
    private Integer elapsedMilliseconds;

    @NoArgsConstructor
    @Data
    public static class Result {
        @SerializedName("tracking_number")
        private String trackingNumber;
        @SerializedName("waybill_number")
        private String waybillNumber;
        @SerializedName("exchange_number")
        private String exchangeNumber;
        @SerializedName("tracking_status")
        private String trackingStatus;
        @SerializedName("last_mile_tracking_expected")
        private Boolean lastMileTrackingExpected;
        @SerializedName("checkpoints")
        private List<Checkpoints> checkpoints;

        @NoArgsConstructor
        @Data
        public static class Checkpoints {
            @SerializedName("time_stamp")
            private String timeStamp;
            @SerializedName("time_zone")
            private String timeZone;
            @SerializedName("tracking_status")
            private String trackingStatus;
            @SerializedName("message")
            private String message;
            @SerializedName("location")
            private String location;
        }
    }
}
